﻿using BCEntity.TMS.MoveHouseConfig.MoveHouseConfig;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.MoveHouseConfig.MoveHouseConfig
{
    public interface IMoveHouseConfigData
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<MoveHouseConfigEntity> InsertAsync(MoveHouseConfigEntity entity);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<MoveHouseConfigEntity> UpdateAsync(MoveHouseConfigEntity entity);
        /// <summary>
        /// 获取信息
        /// </summary>
        /// <param name="moveHouseConfigId"></param>
        /// <returns></returns>
        Task<MoveHouseConfigEntity> GetSingle(long moveHouseConfigId);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="moveHouseConfigId"></param>
        /// <returns></returns>
        Task<int> DeleteAsync(long moveHouseConfigId);
        /// <summary>
        /// 获取所有的二级二类
        /// </summary>
        /// <param name="isEnable"></param>
        /// <returns></returns>
        Task<IEnumerable<MoveHouseConfigEntity>> GetAllSecondList(bool? isEnable);
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="isEnable"></param>
        /// <param name="level"></param>
        /// <returns></returns>
        Task<IEnumerable<MoveHouseConfigEntity>> GetAllList(bool? isEnable, int level);
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="moveHouseConfigId"></param>
        /// <param name="isEnable"></param>
        /// <param name="level"></param>
        /// <returns></returns>
        Task<IEnumerable<MoveHouseConfigEntity>> GetList(long moveHouseConfigId, bool? isEnable, int level);
        /// <summary>
        /// 分页(错误,需修复)
        /// </summary>
        /// <param name="parentId"></param>
        /// <param name="isEnable"></param>
        /// <param name="level"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(IEnumerable<MoveHouseConfigEntity>, int)> Query(long? parentId, bool? isEnable, int? level,
            int pageIndex, int pageSize);
        /// <summary>
        /// 获取分类列表
        /// </summary>
        /// <param name="moveHouseConfigId">搬家设置id</param>
        /// <returns></returns>
        Task<IEnumerable<MoveHouseConfigEntity>> GetAllClientList(long moveHouseConfigId);
        /// <summary>
        /// 获取信息
        /// </summary>
        /// <param name="parentId">父级id</param>
        /// <returns></returns>
        Task<MoveHouseConfigEntity> GetParentSingle(long parentId);

        /// <summary>
        /// 获取当前分类下最低的价格
        /// </summary>
        /// <param name="moveHouseConfigId">搬家分类id</param>
        /// <returns></returns>
        Task<Decimal> GetMinPrice(long moveHouseConfigId);
    }
}
